3.7 \(\int \frac{(d+e x) (a+b \log (c x^n))}{x^3} \, dx\)

Optimal. Leaf size=60 \[ -\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac{b e^2 n \log (x)}{2 d}-\frac{b d n}{4 x^2}-\frac{b e n}{x} \]

[Out]

-(b*d*n)/(4*x^2) - (b*e*n)/x + (b*e^2*n*Log[x])/(2*d) - ((d + e*x)^2*(a + b*Log[c*x^n]))/(2*d*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0492517, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {37, 2334, 12, 43} \[ -\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac{b e^2 n \log (x)}{2 d}-\frac{b d n}{4 x^2}-\frac{b e n}{x} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n]))/x^3,x]

[Out]

-(b*d*n)/(4*x^2) - (b*e*n)/x + (b*e^2*n*Log[x])/(2*d) - ((d + e*x)^2*(a + b*Log[c*x^n]))/(2*d*x^2)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx &=-\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}-(b n) \int -\frac{(d+e x)^2}{2 d x^3} \, dx\\ &=-\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac{(b n) \int \frac{(d+e x)^2}{x^3} \, dx}{2 d}\\ &=-\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}+\frac{(b n) \int \left (\frac{d^2}{x^3}+\frac{2 d e}{x^2}+\frac{e^2}{x}\right ) \, dx}{2 d}\\ &=-\frac{b d n}{4 x^2}-\frac{b e n}{x}+\frac{b e^2 n \log (x)}{2 d}-\frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 d x^2}\\ \end{align*}

Mathematica [A]  time = 0.0227524, size = 41, normalized size = 0.68 \[ -\frac{2 a (d+2 e x)+2 b (d+2 e x) \log \left (c x^n\right )+b n (d+4 e x)}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n]))/x^3,x]

[Out]

-(2*a*(d + 2*e*x) + b*n*(d + 4*e*x) + 2*b*(d + 2*e*x)*Log[c*x^n])/(4*x^2)

________________________________________________________________________________________

Maple [C]  time = 0.097, size = 232, normalized size = 3.9 \begin{align*} -{\frac{b \left ( 2\,ex+d \right ) \ln \left ({x}^{n} \right ) }{2\,{x}^{2}}}-{\frac{2\,i\pi \,bex{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-2\,i\pi \,bex{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -2\,i\pi \,bex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+2\,i\pi \,bex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +4\,\ln \left ( c \right ) bex+4\,benx+4\,aex+i\pi \,bd{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-i\pi \,bd{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -i\pi \,bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+i\pi \,bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +2\,\ln \left ( c \right ) bd+bdn+2\,ad}{4\,{x}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*ln(c*x^n))/x^3,x)

[Out]

-1/2*b*(2*e*x+d)/x^2*ln(x^n)-1/4*(2*I*Pi*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*Pi*b*e*x*csgn(I*x^n)*csgn(I*c*x
^n)*csgn(I*c)-2*I*Pi*b*e*x*csgn(I*c*x^n)^3+2*I*Pi*b*e*x*csgn(I*c*x^n)^2*csgn(I*c)+4*ln(c)*b*e*x+4*b*e*n*x+4*a*
e*x+I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*d*csgn(I*c*x^n)^3
+I*Pi*b*d*csgn(I*c*x^n)^2*csgn(I*c)+2*ln(c)*b*d+b*d*n+2*a*d)/x^2

________________________________________________________________________________________

Maxima [A]  time = 1.1398, size = 77, normalized size = 1.28 \begin{align*} -\frac{b e n}{x} - \frac{b e \log \left (c x^{n}\right )}{x} - \frac{b d n}{4 \, x^{2}} - \frac{a e}{x} - \frac{b d \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac{a d}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="maxima")

[Out]

-b*e*n/x - b*e*log(c*x^n)/x - 1/4*b*d*n/x^2 - a*e/x - 1/2*b*d*log(c*x^n)/x^2 - 1/2*a*d/x^2

________________________________________________________________________________________

Fricas [A]  time = 0.975369, size = 140, normalized size = 2.33 \begin{align*} -\frac{b d n + 2 \, a d + 4 \,{\left (b e n + a e\right )} x + 2 \,{\left (2 \, b e x + b d\right )} \log \left (c\right ) + 2 \,{\left (2 \, b e n x + b d n\right )} \log \left (x\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="fricas")

[Out]

-1/4*(b*d*n + 2*a*d + 4*(b*e*n + a*e)*x + 2*(2*b*e*x + b*d)*log(c) + 2*(2*b*e*n*x + b*d*n)*log(x))/x^2

________________________________________________________________________________________

Sympy [A]  time = 1.74062, size = 75, normalized size = 1.25 \begin{align*} - \frac{a d}{2 x^{2}} - \frac{a e}{x} - \frac{b d n \log{\left (x \right )}}{2 x^{2}} - \frac{b d n}{4 x^{2}} - \frac{b d \log{\left (c \right )}}{2 x^{2}} - \frac{b e n \log{\left (x \right )}}{x} - \frac{b e n}{x} - \frac{b e \log{\left (c \right )}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))/x**3,x)

[Out]

-a*d/(2*x**2) - a*e/x - b*d*n*log(x)/(2*x**2) - b*d*n/(4*x**2) - b*d*log(c)/(2*x**2) - b*e*n*log(x)/x - b*e*n/
x - b*e*log(c)/x

________________________________________________________________________________________

Giac [A]  time = 1.31876, size = 77, normalized size = 1.28 \begin{align*} -\frac{4 \, b n x e \log \left (x\right ) + 4 \, b n x e + 4 \, b x e \log \left (c\right ) + 2 \, b d n \log \left (x\right ) + b d n + 4 \, a x e + 2 \, b d \log \left (c\right ) + 2 \, a d}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x^3,x, algorithm="giac")

[Out]

-1/4*(4*b*n*x*e*log(x) + 4*b*n*x*e + 4*b*x*e*log(c) + 2*b*d*n*log(x) + b*d*n + 4*a*x*e + 2*b*d*log(c) + 2*a*d)
/x^2